<div class="inner-content-root">
  <div class="filter-box">
    <div class="search">
      <nz-input-group nzSearch [nzAddOnAfter]="suffixIconButton">
        <input type="text" nz-input placeholder="搜索管理员"/>
      </nz-input-group>
      <ng-template #suffixIconButton>
        <button nz-button nzType="primary" nzSearch><span nz-icon nzType="search"></span></button>
      </ng-template>
    </div>
    <div class="add">
      <button nz-button nzType="primary" (click)="addData()">添加</button>
    </div>
  </div>
  <div class="content">
    <nz-table #basicTable [nzData]="dataList">
      <thead>
      <tr>
        <th>管理员ID</th>
        <th>权限</th>
        <th>管理员姓名</th>
        <th>手机</th>
        <th>创建时间</th>
        <th>状态</th>
        <th>操作</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let data of basicTable.data">
        <td>{{data.adminId}}</td>
        <td>{{data.authTypeStr}}</td>
        <td>{{data.adminName}}</td>
        <td>{{data.account}}</td>
        <td>{{data.createTimeStr}}</td>
        <td>{{data.online ? '已上线' : '已下线'}}</td>
        <td>
          <button nz-button nzType="link" (click)="editData(data)">编辑</button>
          <button nz-button nzType="link">重置密码</button>
          <button nz-button nzType="link" (click)="switchOnline(data)">{{data.online ? '下线' : '上线'}}</button>
        </td>
      </tr>
      </tbody>
    </nz-table>
  </div>
</div>
